﻿@using CommandLib
@model BackEnd.Models.AccountModel
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using (Html.BeginForm())
{     
    @Html.AntiForgeryToken()
    <div>
        <h2>Edit account</h2>         
        <table>
            <tr>
                <td class="editor-label">
                    @Html.ValidationMessageFor(m => m.MessageResult)
                </td>
                <td class="editor-field">
                    @Html.HiddenFor(m => m.Id)                     
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.FirstName) 
                </td>
                <td class="editor-field">
                    @Html.TextBoxFor(m => m.FirstName)                     
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.LastName) 
                </td>
                <td class="editor-field">
                    @Html.TextBoxFor(m => m.LastName)                     
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Email) 
                </td>
                <td class="editor-field">
                    @Html.TextBoxFor(m => m.Email)                     
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.CountryId) 
                </td>
                <td class="editor-field">
                    @Html.DropDownListFor(m => m.CountryId, new SelectList(Model.ListCountry, "ID", "CountryName"), "----All----") 
                    @Html.ValidationMessageFor(m=>m.CountryId)                   
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.CreateDate) 
                </td>
                <td class="editor-field">
                    @Html.TextBoxFor(m => m.CreateDate)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.CurrentExpiresDate) 
                </td>
                <td class="editor-field">
                    @Html.TextBoxFor(m => m.CurrentExpiresDate, new { @readonly = "readonly"})
                </td>
            </tr> 
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.ExpiresDate) 
                </td>
                <td class="editor-field">
                    @Html.TextBoxFor(m => m.ExpiresDate)
                </td>
            </tr>            
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.Status) 
                </td>
                <td class="editor-field">
                    <select id="Status" name="Status">
                        <option>----All----</option>
                        <option value="@Constants.StatusAccount.IS_ACTIVE" @(Constants.StatusAccount.IS_ACTIVE == Model.Status ? "selected='selected'" : "")>Active</option>
                        <option value="@Constants.StatusAccount.IS_NOT_ACTIVE" @(Constants.StatusAccount.IS_NOT_ACTIVE == Model.Status ? "selected='selected'" : "")>Not Active</option>
                    </select>
                </td>
            </tr>  
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(m => m.ConfirmSendEmail)
                </td>
                <td class="editor-field">
                    @Html.CheckBoxFor(m => m.ConfirmSendEmail)
                </td>
            </tr>          
            <tr>
                <td></td>
                <td>            
                    <img class="NFButtonLeft NFh" src="/Content/Img/0.png"><input id="submit" class="NFButton NFh" type="submit" value="Update" name="submit"><img class="NFButtonRight NFh" src="/Content/Img/0.png">@Html.ActionLink("Back", "Account", "Report")            
                </td>
            </tr>
        </table>
        
    </div>
    } 
<script src="~/Scripts/ckeditor/ckeditor.js"></script>
<script src="~/Scripts/ckeditor/adapters/jquery.js"></script>
<script type="text/javascript">
    $(function () {                   
        $('#CreateDate').datepicker();
    });
</script>
